#include <vector>

#define	DEFAULT_STREAM_SIZE	1024	// 1 MB

class Document
{
	private:
		// Primary pointers
		int	p_gapStart;
		int	p_gapLength;
		int	p_cursor;
		
		// Primary data structure
		std::vector< char > stream;
		
		// Some operations
		void	resizeStream();
	
	public:
		Document();
		~Document();
		
		void	relocateCursor(int pos);
		void	insertChar(char c);
		void	backspace();
};